#include "include.h"
using namespace std;

bool cell::check_tag(){
    if(tag) return true;
    else return false;
}

void cell::set_position(int a, int b){
    x = a;
    y = b;
}

void cell::read_position(int a, int b){
    a = x;
    b = y;
}

void cell::clear_tag(){
    tag = false;
}

void cell::set_val(int i)
{
    val = i;
}

curtain::curtain(){
    cout << "constructing..." << endl;
    for(int i = 0; i < 4; i++){
        for(int j = 0; j < 4; j++){
            cell[i][j].set_position(i, j);
            cell[i][j].clear_tag();
        }
    }
}

curtain::~curtain(){
    cout << "destructing..." << endl;
}

void curtain::Random_Generate_number()
{
    srand(time(0));
    cell0.set_val(pow(2, rand()%3 + 1));
}

void curtain::Random_Position_number()
{
    srand(1);
    cell0.set_position(rand()%4,rand()%4);
}